//
//  WHDialog.h
//  WHPersonalData
//
//  Created by hyf on 2023/3/21.
//  Copyright © 2023 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WMZDialog.h"

@interface WHDialog : NSObject

+ (instancetype)sharedManager;
@property(nonatomic, strong) WMZDialog *mDialog;
/// 显示转圈的加载框
/// - Parameters:
///   - text: 文本
- (WMZDialog *)showHudWithText:(NSString*)text;

/// 显示错误的加载框
/// - Parameters:
///   - text: 文本
- (WMZDialog *)showHudErrorWithText:(NSString*)text;

/// 显示成功的加载框
/// - Parameters:
///   - text: 文本
- (WMZDialog *)showHudSuccessWithText:(NSString*)text;

/// 显示警告的加载框
/// - Parameters:
///   - text: 文本
- (WMZDialog *)showHudAlertWithText:(NSString*)text;

/// 显示进度条的加载框
/// - Parameters:
///   - text: 文本
- (WMZDialog *)showProgressHUDWithText:(NSString*)text;

/// 修改进度条
/// - Parameters:
///   - value: 进度值
///   - dialog: 进度条弹框
- (void)updateAlertTypeDownProgress:(CGFloat)value Dialog:(WMZDialog *) dialog;

/// 显示选择弹框
/// - Parameters:
///   - text: 标题文字
///   - data: 选择的数据
///   - oKFinishBlock: 确定block
///   - wCustomCellBlock: 自定义cell
- (void)showListSelectWithText:(NSString*)text data:(NSArray *)data OKFinishBlock:(void (^)(id anyID,id otherData)) oKFinishBlock wCustomCellBlock:(UITableViewCell* (^)(NSIndexPath* indexPath,UITableView* tableView,id model,BOOL isSelected)) wCustomCellBlock;

/// 显示单选选择弹框
/// - Parameters:
///   - text: 标题文字
///   - data: 选择的数据
///   - oKFinishBlock: 确定block
///   - wCustomCellBlock: 自定义cell
///   - wSelectCellBlock：自定义cell点击事件
- (void)showListSingleSelectWithText:(NSString*)text
                                data:(NSArray *)data
                       OKFinishBlock:(void (^)(id anyID,id otherData)) oKFinishBlock
                    wCustomCellBlock:(UITableViewCell* (^)(NSIndexPath* indexPath,UITableView* tableView,id model,BOOL isSelected)) wCustomCellBlock
                    wSelectCellBlock:(void (^)(NSIndexPath* indexPath,UITableView* tableView,id model))wSelectCellBlock;

/// 显示带自定义图片的弹框
/// - Parameters:
///   - text: 标题文字
///   - image: 自定义图片
- (void)showHUDImgWithText:(NSString*)text image:(UIImage*)image;

/// 关闭进度弹框
/// - Parameter dialog: 进度条弹框
- (void)dismissWithDialog:(WMZDialog *) dialog;

/// 关闭弹框 wAutoCloseSet(NO) 自动关闭设置为no后要调这个
- (void)dismissWithView;

/// 关闭所有弹框
/// - Parameters:
///   - dialog: 进度条弹框
- (void)closeAllDialogWithDialog:(WMZDialog *) dialog;

@end
